.PHONY: build clean tool lint help

BINARY="logagent"

all: build

build:
	@go env -w GO111MODULE=auto
	@go env -w GOPROXY=https://mirrors.aliyun.com/goproxy/
	@go mod tidy
	@go build -o $(BINARY) -v .

clean:
	@go env -w GOPROXY=https://mirrors.aliyun.com/goproxy/
	rm -rf $(BINARY)
	@go clean -i .

help:
	@echo "make: compile packages and dependencies"
	@echo "make tool: run specified go tool"
	@echo "make lint: golint ./..."
	@echo "make clean: remove object files and cached files"